<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap-fileinput/4.3.4/css/fileinput.min.css" />
<link rel="stylesheet" href="http://cdn.bootcss.com/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css" />
<script src="http://cdn.bootcss.com/jquery/3.1.0/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-fileinput/4.3.4/js/fileinput.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-fileinput/4.3.4/js/locales/zh.min.js"></script>
<script src="http://cdn.bootcss.com/jquery.bootstrapvalidator/0.5.3/js/bootstrapValidator.min.js"></script>
<script src="http://cdn.bootcss.com/jquery.bootstrapvalidator/0.5.3/js/language/zh_CN.min.js"></script>
<script src="./btFormBuilder.js"></script>
</head>
<body>
<div class="col-sm-6 col-sm-offset-2" >
	<center><h3>
		二级联动
	</h3></center>
	<form id="fm" action=".../url..." role="form" rank="false" class="form-horizontal" labcol=3 feild=6>
</form>
</div>
</body>
</html>
<script>
var fvalue = [{"name":"中国","child":[{"name":"北京"},{"name":"上海"}]},{"name":"日本","child":[{"name":"东京"}]},{"name":"英国","child":[{"name":"伦敦"}]},{"name":"法国","child":[{"name":"巴黎"},{"name":"纽约"}]}]

$('#fm').btFormBuilder({
				columns:[{
					label:'国家',
					name:'country',
					type:'select',
					optiongroup:fvalue
	
				},{
					label:'城市',
					name:'city',
					type:'select',
					parents:'country'
				},{
					show:'确认',
					name:'login',
					type:'submit'
				}]
		})
</script>